<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>会员列表</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/static/manager/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/static/manager/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="/static/manager/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/static/manager/css/animate.min.css" rel="stylesheet">
    <link href="/static/manager/css/style.min.css?v=4.0.0" rel="stylesheet">
    <base target="_blank">
    <link rel="stylesheet" href="/static/layui/css/layui.css" >
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>用户列表</h5>
                    </div>
                    <div class="ibox-content">

                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th>手机号</th>
                                    <th>昵称</th>
                                    <th>余额</th>
                                    <th>用户等级</th>
                                    <th>收益模式</th>
                                    <th>上级用户</th>
                                    <th>注册时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {volist name='userc' id='vo'}
                            <tr class="gradeX">
                                <td>{$vo.u_phone}</td>
                                <td>{$vo.u_nick}</td>
                                <td>￥{$vo.u_money}</td>
                                <td>{$vo.u_dengji}</td>
                                <td>
                                    {eq name="vo.u_type" value="0" }未选择{/eq}
                                    {eq name="vo.u_type" value="1" }双轨收益{/eq}
                                    {eq name="vo.u_type" value="2" }矩阵收益{/eq}
                                </td>
                                <td>{$vo.u_pre_phone}</td>
                                <td>{$vo.crtime}</td>
                                <td>
                                    <button type="button" class="btn btn-primary btn-sm" onclick="updata({$vo.u_id})">编辑</button>
                                    <button type="button" class="btn btn-default btn-sm" onclick="deletedata({$vo.u_id})">删除</button>
                                </td>
                            </tr>
                            {/volist}
                                
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>
        
    </div>
    <script src="/static/layui/layui.all.js"></script>
    <script src="/static/manager/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/manager/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/static/manager/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="/static/manager/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="/static/manager/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="/static/manager/js/content.min.js?v=1.0.0"></script>
    <script>
        $(document).ready(function() {
            $('.dataTables-example').DataTable();
        } );
        function deletedata(id) {
            if(confirm("确定要删除数据吗？"))
            {
                $.post("/manager/user/num_list_dele",{id:id},function(result){
                    alert(result);
                    window.location.reload();
                });
            }

        }

        function updata(id) {
            window.location.href = "/manager/user/num_edit?id="+id;
        }


    </script>


</body>

</html>